package org.jctc.els.modules.biz.entity.message;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 消息表
 * </p>
 *
 * @author lyh
 * @since 2021-02-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("jtc_message")
@ApiModel(value="Message对象", description="消息表")
public class Message extends Model<Message> {

   // private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "过期时间")
    private Date expirationTime;

    @ApiModelProperty(value = "消息类型编码  1：个人  2：学校")
    private String messageTypeCode;

    @ApiModelProperty(value = "发布时间")
    private Date releaseDate;

    @ApiModelProperty(value = "是否发布( 1:已发布; 0:未发布  )")
    private Boolean releaseFlag;

    private Date createTime;

    private Date modifiedTime;

    private Long createUserId;

    @ApiModelProperty(value = "消息对象编码")
    private String messageObjectCode;

    @ApiModelProperty(value = "发布对象的Id(班级ID,学校ID等)")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long paramId;


    /**  @Override
    protected Serializable pkVal() {
        return this.id;
    }
    **/
}
